package cn.opopopo.design_pattern_learn.行为型.中介者.demo1;

// 具体同事类 - 用户
public class User extends Colleague {
    public User(Mediator mediator, String name) {
        super(mediator, name);
    }
    
    @Override
    public void sendMessage(String message) {
        System.out.println(name + " 发送消息: " + message);
        mediator.sendMessage(message, this);
    }
    
    @Override
    public void receiveMessage(String message, String from) {
        System.out.println(name + " 收到消息: " + message + " (来自: " + from + ")");
    }
}